val nameStr = "panda"
val versionStr = "1.0"
val scalaVersionStr = "2.13.1"
name := nameStr

version := versionStr

scalaVersion := scalaVersionStr

lazy val server = (project in file("server")).settings(commonSettings).settings(
  name := nameStr,
  version := versionStr,
  pipelineStages := Seq(digest, gzip),
  libraryDependencies ++= Seq(
    "com.vmunier" %% "scalajs-scripts" % "1.1.4",
    guice,
    specs2 % Test,
    ws,
    ehcache,
    "com.typesafe.play" %% "play-slick" % "4.0.2",
    "com.typesafe.slick" %% "slick-codegen" % "3.3.2",
    "mysql" % "mysql-connector-java" % "5.1.25",
    "com.github.tototoshi" %% "slick-joda-mapper" % "2.4.1",
    "commons-io" % "commons-io" % "2.5",
    "org.apache.poi" % "poi-ooxml" % "3.15",
    "org.apache.commons" % "commons-math3" % "3.6.1",
    "com.aliyun" % "aliyun-java-sdk-core" % "3.7.1",
    "com.aliyun" % "aliyun-java-sdk-dysmsapi" % "1.1.0",
    "com.typesafe.play" %% "play-joda-forms" % "2.7.3",
    "org.apache.xmlgraphics" % "batik-codec" % "1.10",
    "org.zeroturnaround" % "zt-zip" % "1.11",
    "com.github.tototoshi" %% "scala-csv" % "1.3.6",
    "junit" % "junit" % "4.12" % Test,
    "org.apache.pdfbox" % "pdfbox" % "2.0.8",
    "org.apache.pdfbox" % "pdfbox-tools" % "2.0.8",
    "com.h2database" % "h2" % "1.4.199",
    "javax.xml.bind" % "jaxb-api" % "2.3.0",
    "org.apache.commons" % "commons-lang3" % "3.6",
    "org.scala-lang.modules" %% "scala-parallel-collections" % "0.2.0",
    "org.typelevel" %% "cats-core" % "2.0.0",
    "javax.mail" % "mail" % "1.4.7",
    "org.scala-lang" % "scala-reflect" % "2.13.1",
    "org.postgresql" % "postgresql" % "42.2.5",
    "com.github.tminglei" %% "slick-pg" % "0.19.0",
    "com.github.tminglei" %% "slick-pg_joda-time" % "0.19.0",
    "com.github.tminglei" %% "slick-pg_play-json" % "0.19.0",
    "com.github.tminglei" %% "slick-pg_argonaut" % "0.19.0",
    "com.github.tminglei" %% "slick-pg_jts" % "0.19.0",
    "com.github.julien-truffaut" %% "monocle-core" % "2.0.3",
    "com.github.julien-truffaut" %% "monocle-macro" % "2.0.3",
    "org.scalatestplus.play" %% "scalatestplus-play" % "5.1.0" % Test,
    "org.scala-graph" %% "graph-core" % "1.13.2",
    "com.github.alexarchambault" %% "argonaut-shapeless_6.2" % "1.2.0-M11",
    "com.chuusai" %% "shapeless" % "2.3.3",
    "io.scalaland" %% "chimney" % "0.5.3",
    "com.itextpdf" % "itext-asian" % "5.2.0",
    "com.softwaremill.quicklens" %% "quicklens" % "1.6.1",
    "org.biojava" % "biojava-core" % "5.0.0",
    "com.typesafe.akka" %% "akka-stream-typed" % "2.6.5",
    "com.lihaoyi" %% "os-lib" % "0.7.8",
    "com.google.zxing" % "core" % "3.4.1",
    "com.google.zxing" % "javase" % "3.4.1"
  ),
  scalacOptions ++= {
    Seq(
      "-Ymacro-annotations"
    )
  },
).enablePlugins(PlayScala, LauncherJarPlugin)

lazy val commonSettings = Seq(
  scalaVersion := scalaVersionStr
)

onLoad in Global := (onLoad in Global).value andThen { s: State => "project server" :: s }

